# Maintainer: Stéphane Gaudreault <stephane@archlinux.org>
# Contributor: Sylvain HENRY <hsyl20@yahoo.fr>

pkgname=opencl-headers
pkgver=2023.04.17
pkgrel=2
epoch=2
pkgdesc='OpenCL (Open Computing Language) header files'
arch=('any')
url='https://www.khronos.org/registry/cl/'
license=('custom')
makedepends=(cmake python)
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/KhronosGroup/OpenCL-Headers/archive/v${pkgver}.tar.gz")
sha256sums=('0ce992f4167f958f68a37918dec6325be18f848dee29a4521c633aae3304915d')
optdepends=('opencl-clhpp: C++ support')

build() {
  cmake -B build -S OpenCL-Headers* \
    -DCMAKE_INSTALL_PREFIX=/usr \

  cmake --build build
}

package() {
 DESTDIR="$pkgdir" cmake --install build

 install -D -m644 OpenCL-Headers*/LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}
